CFLAGS := -std=gnu99 -Wall -Werror -Wfatal-errors -D_GNU_SOURCE -O3

all: build/libminiutf8.so build/libminiutf8.a

build/utf8.o: utf8.c utf8.h
	@mkdir -p build
	gcc $(CFLAGS) $< -c -o $@


build/libminiutf8.a: build/utf8.o
	ar cr $@ $<
	ranlib $@

build/libminiutf8.so: build/utf8.o
	gcc -shared $< -o $@

clean:
	rm -rfv build
